<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<html>
<head>
    <title>${group.groupName}</title>
    <script type="text/javascript" src="/voteup/resources/js/jquery-1.6.1.js"></script>
    <script type="text/javascript" src="/voteup/resources/js/stylescript.js"></script>
    <script type="text/javascript">
        $(document).ready(function() {
            $(".pane-list li").click(function() {
                window.location = $(this).find("a").attr("href");
                return false;
            });
        });
    </script>
</head>
<body>
<c:import url="/WEB-INF/jsp/header.jsp"/>
<c:import url="/WEB-INF/jsp/menu.jsp"/>
<center>
    <c:if test="${not empty groupmates}">
        <h3>Students of ${group.groupName}</h3></p>
        <ul class="pane-list">
            <c:forEach items="${groupmates}" var="mate">
                <li>
                    <table width="80%" cellspacing="4" cellpadding="3">
                        <tr>
                            <td align="left">
                                <a href="/voteup/persons/${mate.personId}">
                                    <p align="center"><img src="/voteup/resources/img/avatars/${mate.avatar}.jpg"
                                                           width="60"
                                                           height="80"
                                                           border="0"></p>
                                </a></td>
                            <td>
                                <a href="/voteup/persons/${mate.personId}">
                                    <p align="center">${mate.lastName} ${mate.firstName} ${mate.middleName} </p>
                                </a>
                            </td>
                        </tr>
                    </table>
                </li>
            </c:forEach>
        </ul>
    </c:if>
    <c:if test="${empty groupmates}">
        <h3>There are no registered students from ${group.groupName} yet</h3>
    </c:if>
</center>
</body>
</html>